package com.pubinfo.passbook.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.pubinfo.passbook.common.model.bo.witeoff.subitem.ContractWriteoffItems;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 报账子单信息
 *
 * @TableName t_contract_writeoff_items
 */
@Data
@TableName(value = "t_contract_writeoff_items")
public class TContractWriteoffItems {

    @JsonIgnore
    @ApiModelProperty("行项目号")
    @TableId(value = "line_no", type = IdType.AUTO)
    private Integer lineNo;

    /**
     * 外围系统子单唯一标识
     */
    @ApiModelProperty("行项目号")
    @TableField(value = "other_system_detail_id")
    private String otherSystemDetailId;


    @ApiModelProperty("报账单id")
    @TableField(value = "writeoff_id")
    private Integer writeoffId;

    @JsonIgnore
    @ApiModelProperty("用途编码 以下二选一，子单上用户自行选择：\n" +
        "U183" +
        "U184")
    @TableField(value = "usage_code")
    private String usageCode;
    
    @JsonIgnore
    @ApiModelProperty("用途名称 自行维修（U183）\n" +
        "委托外部单位维修（U184）")
    @TableField(value = "usage_name")
    private String usageName;
    
    @ApiModelProperty("列账属性 选项：1-是：使用成本/资本预算，2-否：不使用成本/资本预算，3-否：不使用成本预算（统付），4-建管费  默认 1")
    @TableField(value = "budget_type")
    private Byte budgetType;
    
    @ApiModelProperty("子单金额 用户按比例分摊，可修改（迁改赔补系统中的功能）")
    @TableField(value = "sum")
    private BigDecimal sum;
    
    @ApiModelProperty("摘要 收到赔补费冲减成本+WBS项目编号")
    @TableField(value = "desc_te")
    //@NotEmpty(message = "摘要不能为空")
    private String desc;
    
    /**
     * 合同编码/业务编码
     */
    @ApiModelProperty("合同编码/业务编码")
    private String contractNo;
    
    /**
     * 合同名称/业务名称
     */
    @ApiModelProperty("合同名称/业务名称")
    private String contractName;
    
    @ApiModelProperty("分公司编码")
    private String cityCode;
    @JsonIgnore
    @ApiModelProperty("预算指标编码")
    @TableField(value = "budget_item_code")
    private String budgetItemCode;
    
    @JsonIgnore
    @ApiModelProperty("预算指标名称")
    @TableField(value = "budget_item_name")
    private String budgetItemName;

    @JsonIgnore
    @ApiModelProperty("活动预算编码")
    @TableField(value = "budget_project_code")
    private String budgetProjectCode;

    @JsonIgnore
    @ApiModelProperty("活动预算名称")
    @TableField(value = "budget_project_name")
    private String budgetProjectName;

    @JsonIgnore
    @ApiModelProperty("预算责任中心编码")
    @TableField(value = "budget_org_code")
    private String budgetOrgCode;

    @JsonIgnore
    @ApiModelProperty("预算责任中心名称")
    @TableField(value = "budget_org_name")
    private String budgetOrgName;

    @JsonIgnore
    @ApiModelProperty("ICT编码")
    @TableField(value = "ict_code")
    private String ictCode;

    @JsonIgnore
    @ApiModelProperty("ICT名称")
    @TableField(value = "ict_name")
    private String ictName;

    @JsonIgnore
    @ApiModelProperty("会计科目编码")
    @TableField(value = "debit_account_code")
    private String debitAccountCode;

    @JsonIgnore
    @ApiModelProperty("会计科目名称")
    @TableField(value = "debit_account_name")
    private String debitAccountName;

    @JsonIgnore
    @ApiModelProperty("贷方科目编码")
    @TableField(value = "credit_account_code")
    private String creditAccountCode;

    @JsonIgnore
    @ApiModelProperty("贷方科目名称")
    @TableField(value = "credit_account_name")
    private String creditAccountName;

    @JsonIgnore
    @ApiModelProperty("贷方科目类型")
    @TableField(value = "credit_account_type")
    private Byte creditAccountType;

    @JsonIgnore
    @ApiModelProperty("借贷标识")
    @TableField(value = "is_debiis_debit_credit")
    private Byte isDebiisDebitCredit;

    @JsonIgnore
    @ApiModelProperty("借方科目类型")
    @TableField(value = "debit_account_type")
    private Byte debitAccountType;

    @JsonIgnore
    @ApiModelProperty("记账成本中心编码")
    @TableField(value = "sap_cost_center_code")
    private String sapCostCenterCode;

    @JsonIgnore
    @ApiModelProperty("记账成本中心名称")
    @TableField(value = "sap_cost_center_name")
    private String sapCostCenterName;

    @JsonIgnore
    @ApiModelProperty("利润中心编码")
    @TableField(value = "profits_center_code")
    private String profitsCenterCode;

    @JsonIgnore
    @ApiModelProperty("利润中心名称")
    @TableField(value = "profits_center_name")
    private String profitsCenterName;

    @JsonIgnore
    @ApiModelProperty("订单号")
    @TableField(value = "order_no")
    private String orderNo;

    @ApiModelProperty("Wbs编号")
    @TableField(value = "wbs_no")
    private String wbsNo;

    @ApiModelProperty("Wbs名称")
    @TableField(value = "wbs_name")
    private String wbsName;

    @JsonIgnore
    @ApiModelProperty("网络元素编号")
    @TableField(value = "network_element_code")
    private String networkElementCode;

    @JsonIgnore
    @ApiModelProperty("网络元素名称")
    @TableField(value = "network_element_name")
    private String networkElementName;

    @JsonIgnore
    @ApiModelProperty("专业类别")
    @TableField(value = "specialty")
    private String specialty;

    @JsonIgnore
    @ApiModelProperty("税种编码")
    @TableField(value = "tax_fee_code")
    private String taxFeeCode;

    @JsonIgnore
    @ApiModelProperty("税务期间")
    @TableField(value = "tax_fee_period")
    private String taxFeePeriod;

    @JsonIgnore
    @ApiModelProperty("客户编码")
    @TableField(value = "client_group_code")
    private String clientGroupCode;

    @JsonIgnore
    @ApiModelProperty("客户名称")
    @TableField(value = "client_group_name")
    private String clientGroupName;

    @JsonIgnore
    @ApiModelProperty("产品编码")
    @TableField(value = "product_group_code")
    private String productGroupCode;

    @JsonIgnore
    @ApiModelProperty("产品名称")
    @TableField(value = "product_group_name")
    private String productGroupName;

    @JsonIgnore
    @ApiModelProperty("低值易耗编码")
    @TableField(value = "biz_fee_detail_code")
    private String bizFeeDetailCode;

    @JsonIgnore
    @ApiModelProperty("行项目号")
    @TableField(value = "biz_fee_detail_name")
    private String bizFeeDetailName;

    @JsonIgnore
    @ApiModelProperty("人员类别")
    @TableField(value = "staff_type_code")
    private String staffTypeCode;

    @JsonIgnore
    @ApiModelProperty("借款人帐号")
    @TableField(value = "borrow_person_account")
    private String borrowPersonAccount;

    @JsonIgnore
    @ApiModelProperty("借款人名称")
    @TableField(value = "borrow_person_name")
    private String borrowPersonName;

    @JsonIgnore
    @ApiModelProperty("借款人电话")
    @TableField(value = "borrow_person_tel")
    private String borrowPersonTel;

    @JsonIgnore
    @TableField(value = "borrow_person_date")
    private Date borrowPersonDate;

    @JsonIgnore
    @ApiModelProperty("借款人部门")
    @TableField(value = "dept_name")
    private String deptName;

    @JsonIgnore
    @TableField(value = "currency")
    private String currency;

    @JsonIgnore
    @TableField(value = "exchange_rate")
    private BigDecimal exchangeRate;

    @JsonIgnore
    @ApiModelProperty("币种金额")
    @TableField(value = "currency_sum")
    private BigDecimal currencySum;

    @JsonIgnore
    @ApiModelProperty("特殊总账标识")
    @TableField(value = "special_tag")
    private String specialTag;

    @JsonIgnore
    @ApiModelProperty("备选统驭科目编码")
    @TableField(value = "pre_account_code")
    private String preAccountCode;

    @JsonIgnore
    @ApiModelProperty("备选统驭科目名称")
    @TableField(value = "pre_account_name")
    private String preAccountName;

    @JsonIgnore
    @ApiModelProperty("费用类型")
    @TableField(value = "fee_type")
    private String feeType;

    @JsonIgnore
    @ApiModelProperty("支付类型")
    @TableField(value = "pay_type")
    private String payType;

    @JsonIgnore
    @ApiModelProperty("付款条件")
    @TableField(value = "pay_condition")
    private String payCondition;

    @JsonIgnore
    @ApiModelProperty("款项名称")
    @TableField(value = "fund_name")
    private String fundName;

    @JsonIgnore
    @ApiModelProperty("报账类型")
    @TableField(value = "cmd_type")
    private String cmdType;

    @JsonIgnore
    @ApiModelProperty("履约计划")
    @TableField(value = "bili")
    private String bili;

    @ApiModelProperty("税金 非必须 即挂即付事项必须")
    @TableField(value = "tax_sum")
    private BigDecimal taxSum;

    @ApiModelProperty("不含税金额 非必须 即挂即付事项必须")
    @TableField(value = "no_tax_sum")
    private BigDecimal noTaxSum;

    @JsonIgnore
    @ApiModelProperty("发票金额 非必须 即挂即付事项必须")
    @TableField(value = "invoice_sum")
    private Long invoiceSum;

    @JsonIgnore
    @ApiModelProperty("预计付款日期")
    @TableField(value = "expectedpay_date")
    private String expectedpayDate;

    @JsonIgnore
    @ApiModelProperty("往来类型编码")
    @TableField(value = "contact_detail_info_code")
    private String contactDetailInfoCode;

    @JsonIgnore
    @ApiModelProperty("往来类型名称")
    @TableField(value = "contact_detail_info_name")
    private String contactDetailInfoName;

    @JsonIgnore
    @ApiModelProperty("摊销受益期-开始年月\t非必须\t格式为：YYYYMM")
    @TableField(value = "amortize_begin_date")
    private String amortizeBeginDate;

    @JsonIgnore
    @ApiModelProperty("摊销受益期-结束年月\t非必须\t格式为：YYYYMM")
    @TableField(value = "amortize_end_date")
    private String amortizeEndDate;

    @JsonIgnore
    @ApiModelProperty("资产分类编码")
    @TableField(value = "assets_type_code")
    private String assetsTypeCode;

    @JsonIgnore
    @ApiModelProperty("资产分类名称")
    @TableField(value = "assets_type_name")
    private String assetsTypeName;

    @JsonIgnore
    @ApiModelProperty("子单对应原单号 非必填 子单对应原单号 （进项税转出集成报账用）")
    @TableField(value = "detail_original_writeoff_code")
    private String detailOriginalWriteoffCode;

//    @ApiModelProperty("行项目号")
//    @TableId(value = "lineNo", type = IdType.AUTO)
//    private Integer lineNo;
//
//    @ApiModelProperty("外围系统子单唯一标识")
//    @TableField(value = "otherSystemDetailId")
//    private String otherSystemDetailId;
//
//    @ApiModelProperty("报账单id")
//    @TableField(value = "writeoffId")
//    private Integer writeoffId;
//
//    @ApiModelProperty("用途编码")
//    @TableField(value = "usageCode")
//    private String usageCode;
//
//    @ApiModelProperty("用途名称")
//    @TableField(value = "usageName")
//    private String usageName;
//
//    @ApiModelProperty("列账属性")
//    @TableField(value = "budgetType")
//    private String budgetType;
//
//    @ApiModelProperty("子单金额")
//    @TableField(value = "sum")
//    private BigDecimal sum;
//
//    @ApiModelProperty("子单金额")
//    @TableField(value = "no_tax_sum")
//    private BigDecimal noTaxSum;
//
//    @ApiModelProperty("摘要")
//    @TableField(value = "desc_te")
//    private String desc;
public TContractWriteoffItems(ContractWriteoffItems writeoffItems) {
  BeanUtils.copyProperties(writeoffItems, this);
}
}
